/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package util.converter;

import java.time.LocalDate;
import java.time.ZoneId;
import java.util.Date;

/**
 *
 * @author Joseph
 */
public class DateConverter {

    public static LocalDate convertDateToLocalDate(Date input) {
        LocalDate date = input.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
        return date;
    }
    
    public static Date convertLocalDateToDate(LocalDate input) {
        Date date = Date.from(input.atStartOfDay(ZoneId.systemDefault()).toInstant());
        return date;
    }

    private DateConverter() {
    }
}
